package fr.excilys.gwt.uibinder.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

public class LoginPanel extends Composite {

	interface LoginPanelUiBinder extends UiBinder<Widget, LoginPanel> {
	}
	
	private static LoginPanelUiBinder uiBinder = GWT
			.create(LoginPanelUiBinder.class);

	@UiField
	FormInput usernameInput;
	
	@UiField
	FormInput passwordInput;
	
	public LoginPanel() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	@UiHandler("loginButton")
	public void onLogin(ClickEvent event) {
		Window.alert("OUI!");
	}
}
